#ifndef INPUT_H
#define INPUT_H

#include <allegro5/allegro.h>

using namespace std;
#include "Globals.h"

/*! \class Input
 *  \brief Allegro input event types
 *
 *  \author Jackline Atsango
 *  \author Jean pierre vieira Pereira
 *  \version 3
 *  \date 26 September 2012
 */

class Input
{
    public:

/*! \fn Input
 *  \param event_queue
 *
 *  Initailises keyboard enumerations UP, DOWN, LEFT, RIGHT to false.
 */
        Input(ALLEGRO_EVENT_QUEUE* event_queue = NULL);

/*! \fn void wait_for_event
 *  \brief Allegro function to wait for an event.
 */
        void wait_for_event();

/*! \fn void key_press
 *  \brief Keyboard events are defined
 *  \param bool, signify that the game has been aborted
 *
 *  The keyboard enumerations are set to true if the key is pressed and false if
 *  the key is released.
 */

        void key_press(bool &finish);

/*! \fn ALLEGRO_EVENT get_ev
 *  \returns event
 */
        ALLEGRO_EVENT get_ev();

/*! \fn bool get_key
 *  \brief Check status of keyboard events
 *
 *  Access the keyboard enumerations
 *  \returns bool representing key press or release
 */
        bool get_key(int key);

/*! \fn void set_key
 *  \brief set the desired keyboard button pressed
 */
        void set_key(int key, bool button_press);

        virtual ~Input();

    private:

        ALLEGRO_EVENT _ev;
        ALLEGRO_EVENT_QUEUE *_event_queue;
        bool _key[5];
};

#endif // INPUT_H
